package entity;

import java.util.Date;

public class User {
    private int userId;
    private String username;
    private String password;
    private String phone;
    private String email;
    private Date registerDate;

    // 构造方法
    public User() {}

    public User(String username, String password, String phone, String email) {
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.email = email;
        this.registerDate = new Date();
    }

    // Getter和Setter方法
    public int getUserId() { return userId; }
    public void setUserId(int userId) { this.userId = userId; }

    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }

    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }

    public String getPhone() { return phone; }
    public void setPhone(String phone) { this.phone = phone; }

    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }

    public Date getRegisterDate() { return registerDate; }
    public void setRegisterDate(Date registerDate) { this.registerDate = registerDate; }

    @Override
    public String toString() {
        return "用户ID: " + userId + ", 用户名: " + username + ", 电话: " + phone;
    }
}